package cn.edu.ren;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard;
import org.springframework.cloud.netflix.turbine.EnableTurbine;

@SpringBootApplication
// 在启动类上添加 @EnableHystrix 或者 @EnableCircuitBreaker。
// 注意，@EnableHystrix 中包含了 @EnableCircuitBreaker
@EnableHystrix // 启用hystrix
@EnableCircuitBreaker // 声明启用数据监控
@EnableHystrixDashboard // 声明启用可视化数据监控
@EnableTurbine
public class HystrixApplication02 {
    public static void main(String[] args) {
        SpringApplication.run(HystrixApplication02.class, args);
    }
}
